import { request } from '../request';

/**
 * 获取 Wenxin Access Token
 *
 * @param apiKey Baidu API Key
 * @param secretKey Baidu Secret Key
 */
export function fetchWenxinToken(apiKey: string, secretKey: string) {
  return request<{ access_token: string; error?: string }>({
    data: {
      apiKey,
      secretKey,
    },
    method: 'post',
    url: '/get_wenxin_token/',  // 后端的接口路径
  });
}
